package net.zjvis.lab.nebula.backend.lib.algorithm.conf;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
import net.zjvis.lab.nebula.backend.lib.algorithm.conf.algorithm.Algorithm;
import net.zjvis.lab.nebula.backend.lib.algorithm.conf.connector.Connector;

import java.util.List;

@Builder
@Getter
@Setter
@EqualsAndHashCode
public class Configuration {
    @Builder
    @Getter
    @Setter
    @EqualsAndHashCode
    public static class ConnectorConf {

        @JsonProperty("input")
        @Singular("input")
        private List<Connector> inputList;
        @JsonProperty("output")
        @Singular("output")
        private List<Connector> outputList;
    }
    @JsonProperty("connector")
    private ConnectorConf connectorConf;

    private Algorithm algorithm;

    private Long taskId;

    private String algorithmName;

    /**
     * 检查对象是否合法
     * @return
     */
    public boolean preValidation() {
        return true;
    }
}
